/*
 * Copyright@www.it1997.com.
 * @Author: 陈晓晨
 * @Date: 2020/6/1
 * Description:版权所有 QQ:376231445
 */

package com.it1997.it1997admin.mapper;

import com.it1997.it1997admin.pojo.User;
import com.it1997.it1997admin.vo.AdminVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    User getUserByUserName(@Param("username") String username);

    List<AdminVo> getAdminList(@Param("index") Integer index,@Param("last") Integer last);

    Integer addAdmin(@Param("adminVo") AdminVo adminVo);

    Integer bindRole(@Param("userId") Integer id, @Param("roleId") Integer roleId);

    AdminVo getAdminById(@Param("userId") Integer userId);

    Integer updateAdminById(@Param("adminVo") AdminVo adminVo);

    Integer getAdminCount();

    Integer deleteAdminById(@Param("adminVoList") List<AdminVo> adminVoList);

    List<AdminVo> searchAdmin(@Param("adminVo") AdminVo adminVo,@Param("index") Integer index,@Param("last") Integer last);

    Integer getSearchAdminCount(@Param("adminVo") AdminVo adminVo);
}
